package com.sunop.api.client.user;

import com.sunop.api.interceptor.FeignInterceptor;
import com.sunop.api.model.UserBaseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "user-service",configuration = FeignInterceptor.class)
public interface UserClient {

    @GetMapping("/user/feign/getUserBaseDTO")
    public UserBaseDTO getUserBaseDTO(@RequestParam Integer userId) ;

    @GetMapping("/user/fegin/getclassId")
    public int getclassId(int userId) ;

    @GetMapping("/user/fegin/getUserOverProblemIds")
    public List<Integer> getUserOverProblemIds(int userId) ;

    @PostMapping("/role/fegin/updateUserPoints")
    public Void updateUserPoints(@RequestParam("userId")Integer userId,@RequestParam("points") Integer points) ;

    @PostMapping("/role/fegin/updateProblemPoint")
    public Void updateProblemPoint(@RequestParam("userId")int userId,@RequestParam("points") int points) ;
}
